package architect.dubbo.provider;

import architect.dubbo.service.DemoService;
import com.alibaba.dubbo.config.annotation.Service;

import java.time.LocalDate;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 *
 * @author guanxin
 * @date 2018-04-08 16:29
 */

@Service
public class DefaultDemoServiceImpl implements DemoService {

    @Override
    public String sendMessage(String message) {

        List<String> arrayList = Arrays.asList("a", "b", "c", "d", "e");

        arrayList.stream().map(item -> { return item.toUpperCase(); }).forEach(item -> {
            System.out.println(item);
        });

        return "Hello, " + message + " (from Spring Boot) " + LocalTime.now().toString();
    }
}